from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField
from wtforms.validators import DataRequired, Length

class CommentForm(FlaskForm):
    body = TextAreaField('评论内容', validators=[
        DataRequired(message='评论内容不能为空'),
        Length(min=2, max=1000, message='评论内容长度必须在2到1000个字符之间')
    ])